package com.mashibing.apiboss.service.impl;

import com.mashibing.apiboss.feign.ServiceDriverUserFeign;
import com.mashibing.apiboss.service.DriverUserService;
import com.mashibing.internalcommon.dto.Car;
import com.mashibing.internalcommon.dto.DriverCarBindingRelationship;
import com.mashibing.internalcommon.dto.DriverUser;
import com.mashibing.internalcommon.dto.ResponseResult;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @title: DriverUserServiceImpl
 * @Author Z先森
 * @Date: 2022/9/28 10:45
 * @Version 1.0
 */
@Service
public class DriverUserServiceImpl implements DriverUserService {
    @Resource
    private ServiceDriverUserFeign serviceDriverUserFeign;

    @Override
    public ResponseResult addUser(DriverUser driverUser) {
        serviceDriverUserFeign.addUser(driverUser);
        return ResponseResult.success("");
    }

    @Override
    public ResponseResult updateDriverUser(DriverUser driverUser) {
        serviceDriverUserFeign.updateUser(driverUser);
        return ResponseResult.success("");
    }

    @Override
    public ResponseResult addCar(Car car) {
        return serviceDriverUserFeign.addCar(car);
    }

    @Override
    public ResponseResult bind(DriverCarBindingRelationship driverCarBindingRelationship) {
        return serviceDriverUserFeign.bind(driverCarBindingRelationship);
    }

    @Override
    public ResponseResult unBind(DriverCarBindingRelationship driverCarBindingRelationship) {
        return serviceDriverUserFeign.unBind(driverCarBindingRelationship);
    }
}
